package top.huhuiyu.spirngboot2.total.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;

@TableName(value = "tb_user")
@Data
public class TbUser implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private java.lang.Integer uid;
    private java.lang.String username;
    private java.lang.String password;
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private java.lang.String salt;
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private java.lang.String accessId;
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private java.lang.String accessKey;
    private java.lang.Integer role;
    @TableLogic
    @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
    private java.lang.String deleted;
    @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
    private java.util.Date lastupdate;

    public TbUser viewData() {
        TbUser user = new TbUser();
        user.setUid(this.getUid());
        user.setUsername(this.getUsername());
        user.setAccessId(this.getAccessId());
        user.setAccessKey(this.getAccessKey());
        user.setRole(this.getRole());
        user.setLastupdate(this.getLastupdate());
        return user;
    }

}
